package com.wanmait.community.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wanmait.community.entity.UserRepair;
import com.wanmait.community.mapper.UserRepairMapper;
import com.wanmait.community.service.UserRepairService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;

@Service
@Transactional(rollbackFor = Exception.class)
public class UserRepairServiceImpl extends ServiceImpl<UserRepairMapper, UserRepair> implements UserRepairService{
    @Resource
    private UserRepairMapper userRepairMapper;
    @Override
    public void insertUserRepair(UserRepair userRepair) {
        userRepairMapper.insertUserRepair(userRepair);
    }
    @Override
    public UserRepair selectUserRepairById(Integer id) {//根据id查content
        return userRepairMapper.selectUserRepairById(id);
    }
    @Override
    public void updateUserRepairByAdminRepairId(UserRepair userRepair) {//业主修改报修记录
        userRepairMapper.updateUserRepairByAdminRepairId(userRepair);
    }
    @Override
    public void deleteUserRepairByAdminRepairId(Integer id) {//业主逻辑删除报修信息
        userRepairMapper.deleteUserRepairByAdminRepairId(id);
    }
}
